<style>
.myshow-socials{display: inline-block; width: 96%; margin: 5px 10px; height: 25px; overflow: hidden;}
.mfacebook-sharebutton{float: right; margin: 0 3px;}
.mgoogle-sharebutton{float: right; margin: 0 3px; width: 106px;}
</style>
<?php 
global $myoptions;
$appid = $myoptions['basic_facebook_api']?$myoptions['basic_facebook_api']:'';
?>
<!--  Facebook script -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=<?php echo $appid;?>";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<!--  Google share button -->
<!-- Place this tag after the last share tag. -->
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/platform.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script>

<?php 
if(is_page())
{	
	$social_all = $myoptions['page_social_display']?$myoptions['page_social_display']:'';
}
else 
	$social_all = $myoptions['post_social_display']?$myoptions['post_social_display']:'';

if($social_all=='hidden'){}
else 
{	
?>
	<?php 
	$show_social = get_post_meta($singleid,$wpdb->prefix.'show_social',true);
	if($show_social=='hidden'){}
	else
	{	 	
	?>
	<div class="myshow-socials">
	
		<div class="mfacebook-sharebutton">
			<!-- Facebook sahre -->
			<div class="fb-like" data-href="<?php echo get_permalink($singleid);?>" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>
		</div>
		
		<div class="mgoogle-sharebutton">
			<!-- Place this tag where you want the share button to render. -->
			<div class="g-plus" data-action="share" data-annotation="bubble"></div>
		</div>
		
		<div class="mgoogle-sharebutton">
			     <a href="https://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a>

    			<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
		</div>
	</div>
	<?php 
	}
	// End show social config
}	
?>
<?php
